package com.ruoyi.workflow.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 结算单对象 bus_statement
 * 
 * @author xiaodu
 * @date 2023-07-23
 */
@Getter
@Setter
@TableName("bus_statement")
public class Statement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 客户姓名 */
    @Excel(name = "客户姓名")
    private String customerName;

    /** 客户联系方式 */
    @Excel(name = "客户联系方式")
    private String customerPhone;

    /** 到店时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "到店时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date arrivalTime;

    /** 车牌号码 */
    @Excel(name = "车牌号码")
    private String licensePlate;

    /** 汽车类型 */
    @Excel(name = "汽车类型")
    private String carType;

    /** 服务类型【维修/保养/其他】 */
    @Excel(name = "服务类型【维修/保养/其他】")
    private Long serviceType;

    /** 预约单ID【通过这个来判断是否预约用户，唯一标识】 */
    private Long appointmentInfoId;

    /** 是否是预约用户【0不是，1是】 */
    @Excel(name = "是否是预约用户【0不是，1是】")
    private Integer appointmentUserStatus;

    /** 结算状态【消费中0/已支付1】 */
    @Excel(name = "结算状态【消费中0/已支付1】")
    private Integer payStatus;

    /** 收款时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /** 收款人id */
    private Long payeeId;

    /** 总消费金额 */
    private BigDecimal totalAmount;

    /** 服务项数量 */
    private Integer totalQuantity;

    /** 折扣金额 */
    private BigDecimal discountAmount;

    /** 备注信息 */
    @Excel(name = "备注信息")
    private String info;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("customerName", getCustomerName())
            .append("customerPhone", getCustomerPhone())
            .append("arrivalTime", getArrivalTime())
            .append("licensePlate", getLicensePlate())
            .append("carType", getCarType())
            .append("serviceType", getServiceType())
            .append("appointmentInfoId", getAppointmentInfoId())
            .append("appointmentUserStatus", getAppointmentUserStatus())
            .append("payStatus", getPayStatus())
            .append("payTime", getPayTime())
            .append("payeeId", getPayeeId())
            .append("totalAmount", getTotalAmount())
            .append("totalQuantity", getTotalQuantity())
            .append("discountAmount", getDiscountAmount())
            .append("createTime", getCreateTime())
            .append("info", getInfo())
            .toString();
    }
}
